package bb.lanxing.model.database;

import org.json.JSONObject;

import bb.lanxing.util.JsonUtil;

public class BbsType {
    public String typeName;
    public int typeId;

    public BbsType() {
    }

    public BbsType(String typeName, int typeId) {
        this.typeName = typeName;
        this.typeId = typeId;
    }

    public static BbsType createByJson(JSONObject jSONObject) {
        BbsType bbsType = new BbsType();

        bbsType.typeName = JsonUtil.getStringValue("typeName", jSONObject);
        bbsType.typeId = JsonUtil.getIntegerValue("typeId", jSONObject);

        return bbsType;
    }
}